package nav

/*
#include<stdint.h>
#include<stdbool.h>
extern void nav_dtPathQueue_Delete(void * c_this);
extern void nav_dtPathQueue_DeleteArray(void * c_this);
extern void* nav_NewdtPathQueue();
extern void * nav_dtPathQueue_getNavQuery(void * c_this);
extern unsigned int nav_dtPathQueue_getPathResult(void * c_this,unsigned int ref,void * path,void * pathSize,int maxPath);
extern unsigned int nav_dtPathQueue_getRequestStatus(void * c_this,unsigned int ref);
extern void * nav_dtPathQueue_IndexArray(void * c_this,long n);
extern bool nav_dtPathQueue_init(void * c_this,int maxPathSize,int maxSearchNodeCount,void * tmp_arg_nav);
extern unsigned int nav_dtPathQueue_request(void * c_this,unsigned int startRef,unsigned int endRef,void * startPos,void * endPos,void * filter);
extern void nav_dtPathQueue_update(void * c_this,int maxIters);
extern void * nav_NewDtPathQueuePtrArray(long n);

*/
import "C"
import "unsafe"
import "gitee.com/hasika/cgo"

var _ unsafe.Pointer
var _ cgo.NotUsed

type DtPathQueuePtr uintptr

/*
public void Delete()
*/
func (p DtPathQueuePtr) Delete() {
	var wrap_this unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	C.nav_dtPathQueue_Delete(wrap_this)
}

/*
void DeleteArray()
*/
func (p DtPathQueuePtr) DeleteArray() {
	var wrap_this unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	C.nav_dtPathQueue_DeleteArray(wrap_this)
}

/*
public dtPathQueue()
*/
func NewDtPathQueue() cgo.GoManagedPtr[DtPathQueuePtr] {
	wrap_out := C.nav_NewdtPathQueue()
	go_out := cgo.MakePtr[cgo.GoManagedPtr[DtPathQueuePtr]](uintptr(wrap_out))
	return go_out
}

/*
public dtNavMeshQuery const * getNavQuery() const
*/
func (p DtPathQueuePtr) GetNavQuery() DtNavMeshQueryPtr {
	var wrap_this unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	wrap_out := C.nav_dtPathQueue_getNavQuery(wrap_this)
	go_out := cgo.MakePtr[DtNavMeshQueryPtr](uintptr(wrap_out))
	return go_out
}

/*
public dtStatus getPathResult(dtPathQueueRef ref, dtPolyRef * path, int * pathSize, int const maxPath)
*/
func (p DtPathQueuePtr) GetPathResult(ref uint32, path *uint32, pathSize *int32, maxPath int32) uint32 {
	var wrap_this unsafe.Pointer
	var wrap_arg_ref C.uint
	var wrap_arg_path unsafe.Pointer
	var wrap_arg_pathSize unsafe.Pointer
	var wrap_arg_maxPath C.int
	wrap_this = unsafe.Pointer(p)
	wrap_arg_ref = (C.uint)(ref)
	wrap_arg_path = (unsafe.Pointer)(path)
	wrap_arg_pathSize = (unsafe.Pointer)(pathSize)
	wrap_arg_maxPath = (C.int)(maxPath)
	wrap_out := C.nav_dtPathQueue_getPathResult(wrap_this, wrap_arg_ref, wrap_arg_path, wrap_arg_pathSize, wrap_arg_maxPath)
	go_out := uint32(wrap_out)
	return go_out
}

/*
public dtStatus getRequestStatus(dtPathQueueRef ref) const
*/
func (p DtPathQueuePtr) GetRequestStatus(ref uint32) uint32 {
	var wrap_this unsafe.Pointer
	var wrap_arg_ref C.uint
	wrap_this = unsafe.Pointer(p)
	wrap_arg_ref = (C.uint)(ref)
	wrap_out := C.nav_dtPathQueue_getRequestStatus(wrap_this, wrap_arg_ref)
	go_out := uint32(wrap_out)
	return go_out
}

/*
dtPathQueue * IndexArray(long n)
*/
func (p DtPathQueuePtr) IndexArray(n int) uintptr {
	var wrap_this unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	wrap_out := C.nav_dtPathQueue_IndexArray(wrap_this, C.long(n))
	go_out := uintptr(wrap_out)
	return go_out
}

/*
public bool init(int const maxPathSize, int const maxSearchNodeCount, dtNavMesh * tmp_arg_nav)
*/
func (p DtPathQueuePtr) Init(maxPathSize int32, maxSearchNodeCount int32, tmp_arg_nav DtNavMeshPtr) bool {
	var wrap_this unsafe.Pointer
	var wrap_arg_maxPathSize C.int
	var wrap_arg_maxSearchNodeCount C.int
	var wrap_arg_tmp_arg_nav unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	wrap_arg_maxPathSize = (C.int)(maxPathSize)
	wrap_arg_maxSearchNodeCount = (C.int)(maxSearchNodeCount)
	wrap_arg_tmp_arg_nav = (unsafe.Pointer)(tmp_arg_nav)
	wrap_out := C.nav_dtPathQueue_init(wrap_this, wrap_arg_maxPathSize, wrap_arg_maxSearchNodeCount, wrap_arg_tmp_arg_nav)
	go_out := bool(wrap_out)
	return go_out
}

/*
public dtPathQueueRef request(dtPolyRef startRef, dtPolyRef endRef, float const * startPos, float const * endPos, dtQueryFilter const * filter)
*/
func (p DtPathQueuePtr) Request(startRef uint32, endRef uint32, startPos *float32, endPos *float32, filter DtQueryFilterPtr) uint32 {
	var wrap_this unsafe.Pointer
	var wrap_arg_startRef C.uint
	var wrap_arg_endRef C.uint
	var wrap_arg_startPos unsafe.Pointer
	var wrap_arg_endPos unsafe.Pointer
	var wrap_arg_filter unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	wrap_arg_startRef = (C.uint)(startRef)
	wrap_arg_endRef = (C.uint)(endRef)
	wrap_arg_startPos = (unsafe.Pointer)(startPos)
	wrap_arg_endPos = (unsafe.Pointer)(endPos)
	wrap_arg_filter = (unsafe.Pointer)(filter)
	wrap_out := C.nav_dtPathQueue_request(wrap_this, wrap_arg_startRef, wrap_arg_endRef, wrap_arg_startPos, wrap_arg_endPos, wrap_arg_filter)
	go_out := uint32(wrap_out)
	return go_out
}

/*
public void update(int const maxIters)
*/
func (p DtPathQueuePtr) Update(maxIters int32) {
	var wrap_this unsafe.Pointer
	var wrap_arg_maxIters C.int
	wrap_this = unsafe.Pointer(p)
	wrap_arg_maxIters = (C.int)(maxIters)
	C.nav_dtPathQueue_update(wrap_this, wrap_arg_maxIters)
}

/*
dtPathQueue * NewDtPathQueuePtrArray(long n)
*/
func NewDtPathQueuePtrArray(n int) cgo.GoManagedPtr[cgo.Array[DtPathQueuePtr]] {
	wrap_out := C.nav_NewDtPathQueuePtrArray(C.long(n))
	go_out := cgo.MakePtr[cgo.GoManagedPtr[cgo.Array[DtPathQueuePtr]]](uintptr(wrap_out))
	return go_out
}
